<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Load By RequireJS</title>
	<link rel="stylesheet" href="demo.css">
</head>

<body>

<form data-validator-option="{timely:2}">
    <div class="form-item">
		<input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
	</div>
    <div class="form-item">
		<input type="password" name="password" data-rule="required;" placeholder="Password">
	</div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>


<script src="http://requirejs.org/docs/release/2.1.17/minified/require.js"></script>
<script>
requirejs.config({
    paths: {
        jquery: 'http://dn-nice.qbox.me/libs/jquery/1.x/jquery.min',
        validator: '../local/en'
    }
});

define('demo', ['jquery', 'validator'], function($){
    // do something
});

require(['demo']);

</script>
</body>
</html>